<?php
/**
 * 获取输入统一入口
 * @author china_php<china_php@hotmail.com>
 * @version		1.0 - 2010-03-30
 * @package		Libs/biz
 */
include_once LIB_PATH . 'pf_filter.php';
class pf_request
{

	public static function get($str, $defualt=null, $filter='text')
	{
		$res = isset($_GET[$str])?pf_filter::filer($_GET[$str], $filter):$defualt;
		return $res;
	}

	public static function post($str, $defualt=null, $filter='text')
	{
		$res = isset($_POST[$str])?pf_filter::filer($_POST[$str], $filter):$defualt;
		return $res;
	}

	public static function request($str, $defualt=null, $filter='text')
	{
		$res = isset($_REQUEST[$str])?pf_filter::filer($_REQUEST[$str], $filter):$defualt;
		return $res;
	}

	public static function route_m($default='admin')
	{
		return isset($_GET[R_MODEL_KEY])?$_GET[R_MODEL_KEY]:$default;
	}

	public static function route_c($default='index')
	{
		return isset($_GET[R_CONTROLLER_KEY])?$_GET[R_CONTROLLER_KEY]:$default;
	}
	
	public static function route_a($default='index')
	{
		return isset($_GET[R_ACTION_KEY])?$_GET[R_ACTION_KEY]:$default;
	}

	
	public static function remove_xss()
	{

	}
}

?>